Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Imperative programming</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Imperative_programming"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Imperative_programming rootpage-Imperative_programming skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Imperative programming</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style>
<p>In <a href="Computer_science" title="Computer science">computer science</a>, <b>imperative programming</b> is a <a href="Programming_paradigm" title="Programming paradigm">programming paradigm</a> of <a href="Software" title="Software">software</a> that uses <a href="Statement_(computer_science)" title="Statement (computer science)">statements</a> that change a program's <a href="State_(computer_science)" title="State (computer science)">state</a>. In much the same way that the <a href="Imperative_mood" title="Imperative mood">imperative mood</a> in <a href="Natural_language" title="Natural language">natural languages</a> expresses commands, an imperative program consists of <a href="Command_(computing)" title="Command (computing)">commands</a> for the <a href="Computer" title="Computer">computer</a> to perform. Imperative programming focuses on describing <i>how</i> a program operates step by step (with general order of the steps being determined in <a href="Source_code" title="Source code">source code</a> by the placement of statements one below the other),<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> rather than on high-level descriptions of its expected results.
</p><p>The term is often used in contrast to <a href="Declarative_programming" title="Declarative programming">declarative programming</a>, which focuses on <i>what</i> the program should accomplish without specifying all the details of <i>how</i> the program should achieve the result.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Procedural_programming">Procedural programming</h2></div>
<p><a href="Procedural_programming" title="Procedural programming">Procedural programming</a> is a type of imperative programming in which the program is built from one or more procedures (also termed <a href="Subroutine" class="mw-redirect" title="Subroutine">subroutines</a> or functions). The terms are often used as synonyms, but the use of procedures has a dramatic effect on how imperative programs appear and how they are constructed. Heavy procedural programming, in which <a href="State_(computer_science)" title="State (computer science)">state</a> changes are localized to procedures or restricted to explicit arguments and returns from procedures, is a form of <a href="Structured_programming" title="Structured programming">structured programming</a>. Since the 1960s, structured programming and <a href="Modular_programming" title="Modular programming">modular programming</a> in general have been promoted as techniques to improve the <a href="Maintainability" title="Maintainability">maintainability</a> and overall quality of imperative programs. The concepts behind <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a> attempt to extend this approach.
</p><p>Procedural programming could be considered a step toward declarative programming. A programmer can often tell, simply by looking at the names, arguments, and return types of procedures (and related comments), what a particular procedure is supposed to do, without necessarily looking at the details of how it achieves its result. At the same time, a complete program is still imperative since it <i>fixes</i> the statements to be executed and their order of execution to a large extent.
</p>
<div class="mw-heading mw-heading2"><h2 id="Rationale_and_foundations_of_imperative_programming">Rationale and foundations of imperative programming</h2></div>
<p>The programming paradigm used to build programs for almost all computers typically follows an imperative model.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>note 1<span class="cite-bracket">]</span></a></sup> Digital computer hardware is designed to execute <a href="Machine_code" title="Machine code">machine code</a>, which is native to the computer and is usually written in the imperative style, although low-level compilers and interpreters using other paradigms exist for some architectures such as <a href="Lisp_machine" title="Lisp machine">lisp machines</a>.
</p><p>From this low-level perspective, the program state is defined by the contents of memory, and the statements are instructions in the native machine language of the computer. Higher-level imperative languages use <a href="Variable_(programming)" class="mw-redirect" title="Variable (programming)">variables</a> and more complex statements, but still follow the same paradigm. <a href="Recipe" title="Recipe">Recipes</a> and process <a href="Checklist" title="Checklist">checklists</a>, while not <a href="Computer_program" title="Computer program">computer programs</a>, are also familiar concepts that are similar in style to imperative programming; each step is an instruction, and the physical world holds the state. Since the basic ideas of imperative programming are both conceptually familiar and directly embodied in the hardware, most computer languages are in the imperative style.
</p><p><a href="Destructive_assignment" class="mw-redirect" title="Destructive assignment">Assignment statements</a>, in imperative paradigm, perform an operation on information located in memory and store the results in memory for later use. High-level imperative languages, in addition, permit the <a href="Evaluation_(disambiguation)#Computer_science" class="mw-disambig" title="Evaluation (disambiguation)">evaluation</a> of complex <a href="Expression_(programming)" class="mw-redirect" title="Expression (programming)">expressions</a>, which may consist of a combination of <a href="Arithmetic#Arithmetic_operations" title="Arithmetic">arithmetic operations</a> and <a href="Function_(mathematics)" title="Function (mathematics)">function</a> evaluations, and the assignment of the resulting value to memory. Looping statements (as in <a href="While_loop" title="While loop">while loops</a>, <a href="Do_while_loop" title="Do while loop">do while loops</a>, and <a href="For_loop" title="For loop">for loops</a>) allow a sequence of statements to be executed multiple times. Loops can either execute the statements they contain a predefined number of times, or they can execute them repeatedly until some condition is met. <a href="Conditional_(programming)" class="mw-redirect" title="Conditional (programming)">Conditional</a> <a href="Branch_(computer_science)" title="Branch (computer science)">branching</a> statements allow a sequence of statements to be executed only if some condition is met. Otherwise, the statements are skipped and the execution sequence continues from the statement following them. Unconditional branching statements allow an execution sequence to be transferred to another part of a program. These include the jump (called <i><a href="Goto" title="Goto">goto</a></i> in many languages), <a href="Switch_statement" title="Switch statement">switch</a>, and the subprogram, <a href="Subroutine" class="mw-redirect" title="Subroutine">subroutine</a>, or procedure call (which usually returns to the next statement after the call).
</p><p>Early in the development of <a href="High-level_programming_language" title="High-level programming language">high-level programming languages</a>, the introduction of the <a href="Block_(programming)" title="Block (programming)">block</a> enabled the construction of programs in which a group of statements and declarations could be treated as if they were one statement. This, alongside the introduction of <a href="Subroutine" class="mw-redirect" title="Subroutine">subroutines</a>, enabled complex structures to be expressed by hierarchical decomposition into simpler procedural structures.
</p><p>Many imperative programming languages (such as <a href="Fortran" title="Fortran">Fortran</a>, <a href="BASIC" title="BASIC">BASIC</a>, and <a href="C_(programming_language)" title="C (programming language)">C</a>) are <a href="Abstraction_(computer_science)" title="Abstraction (computer science)">abstractions</a> of <a href="Assembly_language" title="Assembly language">assembly language</a>.<sup id="cite_ref-:0_4-0" class="reference"><a href="#cite_note-:0-4"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="History_of_imperative_and_object-oriented_languages">History of imperative and object-oriented languages</h2></div>
<p>The earliest imperative languages were the machine languages of the original computers. In these languages, instructions were very simple, which made hardware implementation easier but hindered the creation of complex programs. <a href="FORTRAN" class="mw-redirect" title="FORTRAN">FORTRAN</a>, developed by <a href="John_Backus" title="John Backus">John Backus</a> at <a href="International_Business_Machines" class="mw-redirect" title="International Business Machines">International Business Machines</a> (IBM) starting in 1954, was the first major programming language to remove the obstacles presented by machine code in the creation of complex programs. FORTRAN was a <a href="Compiled_language" title="Compiled language">compiled language</a> that allowed named variables, complex expressions, subprograms, and many other features now common in imperative languages. The next two decades saw the development of many other major high-level imperative programming languages. In the late 1950s and 1960s, <a href="ALGOL" title="ALGOL">ALGOL</a> was developed in order to allow mathematical algorithms to be more easily expressed and even served as the <a href="Operating_system" title="Operating system">operating system</a>'s target language for some computers. <a href="MUMPS" title="MUMPS">MUMPS</a> (1966) carried the imperative paradigm to a logical extreme, by not having any statements at all, relying purely on commands, even to the extent of making the IF and ELSE commands independent of each other, connected only by an intrinsic variable named $TEST. <a href="COBOL" title="COBOL">COBOL</a> (1960) and <a href="BASIC" title="BASIC">BASIC</a> (1964) were both attempts to make programming syntax look more like English. In the 1970s, <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a> was developed by <a href="Niklaus_Wirth" title="Niklaus Wirth">Niklaus Wirth</a>, and <a href="C_(programming_language)" title="C (programming language)">C</a> was created by <a href="Dennis_Ritchie" title="Dennis Ritchie">Dennis Ritchie</a> while he was working at <a href="Bell_Laboratories" class="mw-redirect" title="Bell Laboratories">Bell Laboratories</a>. Wirth went on to design <a href="Modula-2" title="Modula-2">Modula-2</a> and <a href="Oberon_(programming_language)" title="Oberon (programming language)">Oberon</a>. For the needs of the <a href="United_States_Department_of_Defense" title="United States Department of Defense">United States Department of Defense</a>, <a href="Jean_Ichbiah" title="Jean Ichbiah">Jean Ichbiah</a> and a team at <a href="Honeywell" title="Honeywell">Honeywell</a> began designing <a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a> in 1978, after a 4-year project to define the requirements for the language. The specification was first published in 1983, with revisions in 1995, 2005, and 2012.
</p><p>The 1980s saw a rapid growth in interest in <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>. These languages were imperative in style, but added features to support <a href="Object_(computing)" class="mw-redirect" title="Object (computing)">objects</a>. The last two decades of the 20th century saw the development of many such languages. <a href="Smalltalk" title="Smalltalk">Smalltalk</a>-80, originally conceived by <a href="Alan_Kay" title="Alan Kay">Alan Kay</a> in 1969, was released in 1980, by the Xerox Palo Alto Research Center (<a href="PARC_(company)" title="PARC (company)">PARC</a>). Drawing from concepts in another object-oriented language—<a href="Simula" title="Simula">Simula</a> (which is considered the world's first <a href="Object-oriented_programming_language" class="mw-redirect" title="Object-oriented programming language">object-oriented programming language</a>, developed in the 1960s)—<a href="Bjarne_Stroustrup" title="Bjarne Stroustrup">Bjarne Stroustrup</a> designed <a href="C%2B%2B" title="C++">C++</a>, an object-oriented language based on <a href="C_(programming_language)" title="C (programming language)">C</a>. Design of <a href="C%2B%2B" title="C++">C++</a> began in 1979 and the first implementation was completed in 1983. In the late 1980s and 1990s, the notable imperative languages drawing on object-oriented concepts were <a href="Perl" title="Perl">Perl</a>, released by <a href="Larry_Wall" title="Larry Wall">Larry Wall</a> in 1987; <a href="Python_(programming_language)" title="Python (programming language)">Python</a>, released by <a href="Guido_van_Rossum" title="Guido van Rossum">Guido van Rossum</a> in 1990; <a href="Visual_Basic_(classic)" title="Visual Basic (classic)">Visual Basic</a> and <a href="Visual_C%2B%2B" class="mw-redirect" title="Visual C++">Visual C++</a> (which included <a href="Microsoft_Foundation_Class_Library" title="Microsoft Foundation Class Library">Microsoft Foundation Class Library</a> (MFC) 2.0), released by <a href="Microsoft" title="Microsoft">Microsoft</a> in 1991 and 1993 respectively; <a href="PHP" title="PHP">PHP</a>, released by <a href="Rasmus_Lerdorf" title="Rasmus Lerdorf">Rasmus Lerdorf</a> in 1994; <a href="Java_(programming_language)" title="Java (programming language)">Java</a>, by <a href="James_Gosling" title="James Gosling">James Gosling</a> (<a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a>) in 1995, <a href="JavaScript" title="JavaScript">JavaScript</a>, by <a href="Brendan_Eich" title="Brendan Eich">Brendan Eich</a> (<a href="Netscape" title="Netscape">Netscape</a>), and <a href="Ruby_(programming_language)" title="Ruby (programming language)">Ruby</a>, by Yukihiro "Matz" Matsumoto, both released in 1995. Microsoft's <a href=".NET_Framework" title=".NET Framework">.NET Framework</a> (2002) is imperative at its core, as are its main target languages, <a href="VB.NET" class="mw-redirect" title="VB.NET">VB.NET</a> and <a href="C_Sharp_(programming_language)" title="C Sharp (programming language)">C#</a> that run on it; however Microsoft's <a href="F_Sharp_(programming_language)" title="F Sharp (programming language)">F#</a>, a functional language, also runs on it.
</p>
<div class="mw-heading mw-heading2"><h2 id="Examples">Examples</h2></div>
<div class="mw-heading mw-heading3"><h3 id="Fortran">Fortran</h3></div>
<p><a href="FORTRAN" class="mw-redirect" title="FORTRAN">FORTRAN</a> (1958) was unveiled as "The IBM Mathematical FORmula TRANslating system." It was designed for scientific calculations, without <a href="String_(computer_science)" title="String (computer science)">string</a> handling facilities. Along with <a href="Declaration_(computer_programming)" title="Declaration (computer programming)">declarations</a>, <a href="Expression_(computer_science)" title="Expression (computer science)">expressions</a>, and <a href="Statement_(computer_science)" title="Statement (computer science)">statements</a>, it supported:
</p>
<ul><li><a href="Array_data_structure" class="mw-redirect" title="Array data structure">arrays</a></li>
<li><a href="Subroutine" class="mw-redirect" title="Subroutine">subroutines</a></li>
<li><a href="For_loop" title="For loop">"do" loops</a></li></ul>
<p>It succeeded because:
</p>
<ul><li>programming and debugging costs were below computer running costs</li>
<li>it was supported by IBM</li>
<li>applications at the time were scientific.<sup id="cite_ref-cpl_3rd-ch2-16_5-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-16-5"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup></li></ul>
<p>However, non IBM vendors also wrote Fortran compilers, but with a syntax that would likely fail IBM's compiler.<sup id="cite_ref-cpl_3rd-ch2-16_5-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-16-5"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> The <a href="American_National_Standards_Institute" title="American National Standards Institute">American National Standards Institute</a> (ANSI) developed the first Fortran standard in 1966. In 1978, Fortran 77 became the standard until 1991. Fortran 90 supports:
</p>
<ul><li><a href="Record_(computer_science)" title="Record (computer science)">records</a></li>
<li><a href="Pointer_(computer_programming)" title="Pointer (computer programming)">pointers</a> to arrays</li></ul>
<div class="mw-heading mw-heading3"><h3 id="COBOL">COBOL</h3></div>
<p><a href="COBOL" title="COBOL">COBOL</a> (1959) stands for "COmmon Business Oriented Language." Fortran manipulated symbols. It was soon realized that symbols did not need to be numbers, so strings were introduced.<sup id="cite_ref-cpl_3rd-ch2-24_6-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-24-6"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup> The <a href="US_Department_of_Defense" class="mw-redirect" title="US Department of Defense">US Department of Defense</a> influenced COBOL's development, with <a href="Grace_Hopper" title="Grace Hopper">Grace Hopper</a> being a major contributor. The statements were English-like and verbose. The goal was to design a language so managers could read the programs. However, the lack of structured statements hindered this goal.<sup id="cite_ref-cpl_3rd-ch2-25_7-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-25-7"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p><p>COBOL's development was tightly controlled, so dialects did not emerge to require ANSI standards. As a consequence, it was not changed for 15 years until 1974. The 1990s version did make consequential changes, like <a href="Object-oriented_programming" title="Object-oriented programming">object-oriented programming</a>.<sup id="cite_ref-cpl_3rd-ch2-25_7-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-25-7"><span class="cite-bracket">[</span>6<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="Algol">Algol</h3></div>
<p><a href="ALGOL" title="ALGOL">ALGOL</a> (1960) stands for "ALGOrithmic Language." It had a profound influence on programming language design.<sup id="cite_ref-cpl_3rd-ch2-19_8-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-19-8"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> Emerging from a committee of European and American programming language experts, it used standard mathematical notation and had a readable structured design. Algol was first to define its <a href="Syntax_(programming_languages)" title="Syntax (programming languages)">syntax</a> using the <a href="Backus%E2%80%93Naur_form" title="Backus–Naur form">Backus–Naur form</a>.<sup id="cite_ref-cpl_3rd-ch2-19_8-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-19-8"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup> This led to <a href="Syntax-directed_translation" title="Syntax-directed translation">syntax-directed</a> compilers. It added features like:
</p>
<ul><li>block structure, where variables were local to their block</li>
<li>arrays with variable bounds</li>
<li><a href="For_loop" title="For loop">"for" loops</a></li>
<li><a href="Subroutine" class="mw-redirect" title="Subroutine">functions</a></li>
<li><a href="Recursion_(computer_science)" title="Recursion (computer science)">recursion</a><sup id="cite_ref-cpl_3rd-ch2-19_8-2" class="reference"><a href="#cite_note-cpl_3rd-ch2-19-8"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup></li></ul>
<p>Algol's direct descendants include <a href="Pascal_(programming_language)" title="Pascal (programming language)">Pascal</a>, <a href="Modula-2" title="Modula-2">Modula-2</a>, <a href="Ada_(programming_language)" title="Ada (programming language)">Ada</a>, <a href="Delphi_(software)" title="Delphi (software)">Delphi</a> and <a href="Oberon_(programming_language)" title="Oberon (programming language)">Oberon</a> on one branch. On another branch there's <a href="C_(programming_language)" title="C (programming language)">C</a>, <a href="C%2B%2B" title="C++">C++</a> and <a href="Java_(programming_language)" title="Java (programming language)">Java</a>.<sup id="cite_ref-cpl_3rd-ch2-19_8-3" class="reference"><a href="#cite_note-cpl_3rd-ch2-19-8"><span class="cite-bracket">[</span>7<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="BASIC">BASIC</h3></div>
<p><a href="BASIC" title="BASIC">BASIC</a> (1964) stands for "Beginner's All Purpose Symbolic Instruction Code." It was developed at <a href="Dartmouth_College" title="Dartmouth College">Dartmouth College</a> for all of their students to learn.<sup id="cite_ref-cpl_3rd-ch2-30_9-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-30-9"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> If a student did not go on to a more powerful language, the student would still remember Basic.<sup id="cite_ref-cpl_3rd-ch2-30_9-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-30-9"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> A Basic interpreter was installed in the <a href="Microcomputers" class="mw-redirect" title="Microcomputers">microcomputers</a> manufactured in the late 1970s. As the microcomputer industry grew, so did the language.<sup id="cite_ref-cpl_3rd-ch2-30_9-2" class="reference"><a href="#cite_note-cpl_3rd-ch2-30-9"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup>
</p><p>Basic pioneered the <a href="Read%E2%80%93eval%E2%80%93print_loop" title="Read–eval–print loop">interactive session</a>.<sup id="cite_ref-cpl_3rd-ch2-30_9-3" class="reference"><a href="#cite_note-cpl_3rd-ch2-30-9"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> It offered <a href="Operating_system" title="Operating system">operating system</a> commands within its environment:
</p>
<ul><li>The 'new' command created an empty slate</li>
<li>Statements evaluated immediately</li>
<li>Statements could be programmed by preceding them with a line number</li>
<li>The 'list' command displayed the program</li>
<li>The 'run' command executed the program</li></ul>
<p>However, the Basic syntax was too simple for large programs.<sup id="cite_ref-cpl_3rd-ch2-30_9-4" class="reference"><a href="#cite_note-cpl_3rd-ch2-30-9"><span class="cite-bracket">[</span>8<span class="cite-bracket">]</span></a></sup> Recent dialects added structure and object-oriented extensions. <a href="Microsoft" title="Microsoft">Microsoft's</a> <a href="Visual_Basic" title="Visual Basic">Visual Basic</a> is still widely used and produces a <a href="Graphical_user_interface" title="Graphical user interface">graphical user interface</a>.<sup id="cite_ref-cpl_3rd-ch2-31_10-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-31-10"><span class="cite-bracket">[</span>9<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading3"><h3 id="C">C</h3></div>
<p><a href="C_(programming_language)" title="C (programming language)">C programming language</a> (1973) got its name because the language <a href="BCPL" title="BCPL">BCPL</a> was replaced with <a href="B_(programming_language)" title="B (programming language)">B</a>, and <a href="Bell_Labs" title="Bell Labs">AT&amp;T Bell Labs</a> called the next version "C." Its purpose was to write the <a href="UNIX" class="mw-redirect" title="UNIX">UNIX</a> <a href="Operating_system" title="Operating system">operating system</a>.<sup id="cite_ref-cpl_3rd-ch2-37_11-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-37-11"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> C is a relatively small language -- making it easy to write compilers. Its growth mirrored the hardware growth in the 1980s.<sup id="cite_ref-cpl_3rd-ch2-37_11-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-37-11"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup> Its growth also was because it has the facilities of <a href="Assembly_language" title="Assembly language">assembly language</a>, but uses a <a href="High-level_programming_language" title="High-level programming language">high-level syntax</a>. It added advanced features like:
</p>
<ul><li><a href="Inline_assembler" title="Inline assembler">inline assembler</a></li>
<li>arithmetic on pointers</li>
<li>pointers to functions</li>
<li>bit operations</li>
<li>freely combining complex <a href="Operators_in_C_and_C%2B%2B" title="Operators in C and C++">operators</a><sup id="cite_ref-cpl_3rd-ch2-37_11-2" class="reference"><a href="#cite_note-cpl_3rd-ch2-37-11"><span class="cite-bracket">[</span>10<span class="cite-bracket">]</span></a></sup></li></ul>

<p><i>C</i> allows the programmer to control in which region of memory data is to be stored. <i>Global variables</i> and <i>static variables</i> require the fewest <a href="Clock_signal" title="Clock signal">clock cycles</a> to store. The <a href="Call_stack" title="Call stack">stack</a> is automatically used for the standard variable <a href="Declaration_(computer_programming)" title="Declaration (computer programming)">declarations</a>. <a href="Manual_memory_management" title="Manual memory management">Heap</a> memory is returned to a <a href="Pointer_(computer_programming)" title="Pointer (computer programming)">pointer variable</a> from the <a href="C_dynamic_memory_allocation" title="C dynamic memory allocation"><code>malloc()</code></a> function.
</p>
<ul><li>The <i>global and static data</i> region is located just above the <i>program</i> region. (The program region is technically called the <i>text</i> region. It's where machine instructions are stored.)</li></ul>
<dl><dd><ul><li>The global and static data region is technically two regions.<sup id="cite_ref-geeksforgeeks_12-0" class="reference"><a href="#cite_note-geeksforgeeks-12"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> One region is called the <i>initialized <a href="Data_segment" title="Data segment">data segment</a></i>, where variables declared with default values are stored. The other region is called the <i><a href=".bss" title=".bss">block started by segment</a></i>, where variables declared without default values are stored.</li>
<li>Variables stored in the <i>global and static data</i> region have their <a href="Memory_address" title="Memory address">addresses</a> set at compile-time. They retain their values throughout the life of the process.</li></ul></dd></dl>
<dl><dd><ul><li>The global and static region stores the <i>global variables</i> that are declared on top of (outside) the <code>main()</code> function.<sup id="cite_ref-cpl-ch1-p31_13-0" class="reference"><a href="#cite_note-cpl-ch1-p31-13"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> Global variables are visible to <code>main()</code> and every other function in the source code.</li></ul></dd></dl>
<dl><dd>On the other hand, variable declarations inside of <code>main()</code>, other functions, or within <code>{</code> <code>}</code> <a href="Block_(programming)" title="Block (programming)">block delimiters</a> are <i>local variables</i>. Local variables also include <i><a href="Parameter_(computer_programming)#Parameters_and_arguments" title="Parameter (computer programming)">formal parameter</a> variables</i>. Parameter variables are enclosed within the parenthesis of function definitions.<sup id="cite_ref-cpl_3rd-ch6-128_14-0" class="reference"><a href="#cite_note-cpl_3rd-ch6-128-14"><span class="cite-bracket">[</span>13<span class="cite-bracket">]</span></a></sup> They provide an <a href="Interface_(computing)" title="Interface (computing)">interface</a> to the function.</dd></dl>
<dl><dd><ul><li><i>Local variables</i> declared using the <code>static</code> prefix are also stored in the <i>global and static data</i> region.<sup id="cite_ref-geeksforgeeks_12-1" class="reference"><a href="#cite_note-geeksforgeeks-12"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> Unlike global variables, static variables are only visible within the function or block. Static variables always retain their value. An example usage would be the function <code>int increment_counter(){ static int counter = 0; counter++; return counter;}</code></li></ul></dd></dl>
<ul><li>The <a href="Call_stack" title="Call stack">stack</a> region is a contiguous block of memory located near the top memory address.<sup id="cite_ref-lpi-ch6-p121_15-0" class="reference"><a href="#cite_note-lpi-ch6-p121-15"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> Variables placed in the stack are populated from top to bottom.<sup id="cite_ref-lpi-ch6-p121_15-1" class="reference"><a href="#cite_note-lpi-ch6-p121-15"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> A <a href="Call_stack#STACK-POINTER" title="Call stack">stack pointer</a> is a special-purpose <a href="Processor_register" title="Processor register">register</a> that keeps track of the last memory address populated.<sup id="cite_ref-lpi-ch6-p121_15-2" class="reference"><a href="#cite_note-lpi-ch6-p121-15"><span class="cite-bracket">[</span>14<span class="cite-bracket">]</span></a></sup> Variables are placed into the stack via the <i>assembly language</i> PUSH instruction. Therefore, the addresses of these variables are set during <a href="Runtime_(program_lifecycle_phase)" class="mw-redirect" title="Runtime (program lifecycle phase)">runtime</a>. The method for stack variables to lose their <a href="Scope_(computer_science)" title="Scope (computer science)">scope</a> is via the POP instruction.</li></ul>
<dl><dd><ul><li><i>Local variables</i> declared without the <code>static</code> prefix, including formal parameter variables,<sup id="cite_ref-lpi-ch6-p122_16-0" class="reference"><a href="#cite_note-lpi-ch6-p122-16"><span class="cite-bracket">[</span>15<span class="cite-bracket">]</span></a></sup> are called <i>automatic variables</i><sup id="cite_ref-cpl-ch1-p31_13-1" class="reference"><a href="#cite_note-cpl-ch1-p31-13"><span class="cite-bracket">[</span>12<span class="cite-bracket">]</span></a></sup> and are stored in the stack.<sup id="cite_ref-geeksforgeeks_12-2" class="reference"><a href="#cite_note-geeksforgeeks-12"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> They are visible inside the function or block and lose their scope upon exiting the function or block.</li></ul></dd></dl>
<ul><li>The <a href="Manual_memory_management" title="Manual memory management">heap</a> region is located below the stack.<sup id="cite_ref-geeksforgeeks_12-3" class="reference"><a href="#cite_note-geeksforgeeks-12"><span class="cite-bracket">[</span>11<span class="cite-bracket">]</span></a></sup> It is populated from the bottom to the top. The <a href="Operating_system" title="Operating system">operating system</a> manages the heap using a <i>heap pointer</i> and a list of allocated memory blocks.<sup id="cite_ref-cpl-ch1-p185_17-0" class="reference"><a href="#cite_note-cpl-ch1-p185-17"><span class="cite-bracket">[</span>16<span class="cite-bracket">]</span></a></sup> Like the stack, the addresses of heap variables are set during runtime. An <a href="Out_of_memory" title="Out of memory">out of memory</a> error occurs when the heap pointer and the stack pointer meet.</li></ul>
<dl><dd><ul><li><i>C</i> provides the <code>malloc()</code> library function to <a href="C_dynamic_memory_allocation" title="C dynamic memory allocation">allocate</a> heap memory.<sup id="cite_ref-cpl-ch8-p187_18-0" class="reference"><a href="#cite_note-cpl-ch8-p187-18"><span class="cite-bracket">[</span>17<span class="cite-bracket">]</span></a></sup> Populating the heap with data is an additional copy function. Variables stored in the heap are economically passed to functions using pointers. Without pointers, the entire block of data would have to be passed to the function via the stack.</li></ul></dd></dl>
<div class="mw-heading mw-heading3"><h3 id="C++">C++</h3></div>
<p>In the 1970s, <a href="Software_engineering" title="Software engineering">software engineers</a> needed language support to break large projects down into <a href="Modular_programming" title="Modular programming">modules</a>.<sup id="cite_ref-cpl_3rd-ch2-38_19-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-38-19"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> One obvious feature was to decompose large projects <i>physically</i> into separate <a href="Computer_file" title="Computer file">files</a>. A less obvious feature was to decompose large projects <i>logically</i> into <a href="Abstract_and_concrete" title="Abstract and concrete">abstract</a> <a href="Data_type" title="Data type">datatypes</a>.<sup id="cite_ref-cpl_3rd-ch2-38_19-1" class="reference"><a href="#cite_note-cpl_3rd-ch2-38-19"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup> At the time, languages supported concrete (<a href="Variable_(computer_science)" title="Variable (computer science)">scalar</a>) datatypes like <a href="Integer" title="Integer">integer</a> numbers, <a href="Floating-point_arithmetic" title="Floating-point arithmetic">floating-point</a> numbers, and <a href="String_(computer_science)" title="String (computer science)">strings</a> of <a href="Character_(computing)" title="Character (computing)">characters</a>. Concrete datatypes have their representation as part of their name.<sup id="cite_ref-stroustrup-ch3-65_20-0" class="reference"><a href="#cite_note-stroustrup-ch3-65-20"><span class="cite-bracket">[</span>19<span class="cite-bracket">]</span></a></sup> Abstract datatypes are <a href="Record_(computer_science)" title="Record (computer science)">structures</a> of concrete datatypes — with a new name assigned. For example, a <a href="List_(abstract_data_type)" title="List (abstract data type)">list</a> of integers could be called <code>integer_list</code>.
</p><p>In object-oriented jargon, abstract datatypes are called <a href="Class_(computer_programming)" title="Class (computer programming)">classes</a>. However, a <i>class</i> is only a definition; no memory is allocated. When memory is allocated to a class, it's called an <a href="Object_(computer_science)" title="Object (computer science)">object</a>.<sup id="cite_ref-cpl_3rd-ch8-193_21-0" class="reference"><a href="#cite_note-cpl_3rd-ch8-193-21"><span class="cite-bracket">[</span>20<span class="cite-bracket">]</span></a></sup>
</p><p><i><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented imperative languages</a></i> developed by combining the need for classes and the need for safe <a href="Functional_programming" title="Functional programming">functional programming</a>.<sup id="cite_ref-cpl_3rd-ch2-39_22-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-39-22"><span class="cite-bracket">[</span>21<span class="cite-bracket">]</span></a></sup> A function, in an object-oriented language, is assigned to a class. An assigned function is then referred to as a <a href="Method_(computer_programming)" title="Method (computer programming)">method</a>, <a href="Method_(computer_programming)#Member_functions_in_C++" title="Method (computer programming)">member function</a>, or <i><a href="Operation_(mathematics)" title="Operation (mathematics)">operation</a></i>. <i>Object-oriented programming</i> is executing <i>operations</i> on <i>objects</i>.<sup id="cite_ref-cpl_3rd-ch2-35_23-0" class="reference"><a href="#cite_note-cpl_3rd-ch2-35-23"><span class="cite-bracket">[</span>22<span class="cite-bracket">]</span></a></sup>
</p><p><i>Object-oriented languages</i> support a syntax to model <a href="Subset" title="Subset">subset/superset</a> relationships. In <a href="Set_theory" title="Set theory">set theory</a>, an <a href="Element_(mathematics)" title="Element (mathematics)">element</a> of a subset inherits all the attributes contained in the superset. For example, a student is a person. Therefore, the set of students is a subset of the set of persons. As a result, students inherit all the attributes common to all persons. Additionally, students have unique attributes that other persons don't have. <i>Object-oriented languages</i> model <i>subset/superset</i> relationships using <a href="Inheritance_(object-oriented_programming)" title="Inheritance (object-oriented programming)">inheritance</a>.<sup id="cite_ref-cpl_3rd-ch8-192_24-0" class="reference"><a href="#cite_note-cpl_3rd-ch8-192-24"><span class="cite-bracket">[</span>23<span class="cite-bracket">]</span></a></sup> <i>Object-oriented programming</i> became the dominant language paradigm by the late 1990s.<sup id="cite_ref-cpl_3rd-ch2-38_19-2" class="reference"><a href="#cite_note-cpl_3rd-ch2-38-19"><span class="cite-bracket">[</span>18<span class="cite-bracket">]</span></a></sup>
</p><p><a href="C%2B%2B" title="C++">C++</a> (1985) was originally called "C with Classes."<sup id="cite_ref-stroustrup-notes-22_25-0" class="reference"><a href="#cite_note-stroustrup-notes-22-25"><span class="cite-bracket">[</span>24<span class="cite-bracket">]</span></a></sup> It was designed to expand <a href="C_(programming_language)" title="C (programming language)">C's</a> capabilities by adding the object-oriented facilities of the language <a href="Simula" title="Simula">Simula</a>.<sup id="cite_ref-stroustrup-notes-21_26-0" class="reference"><a href="#cite_note-stroustrup-notes-21-26"><span class="cite-bracket">[</span>25<span class="cite-bracket">]</span></a></sup>
</p><p>An object-oriented module is composed of two files. The definitions file is called the <a href="Include_directive" title="Include directive">header file</a>. Here is a C++ <i>header file</i> for the <i>GRADE class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// grade.h</span>
<span class="c1">// -------</span>

<span class="c1">// Used to allow multiple source files to include</span>
<span class="c1">// this header file without duplication errors.</span>
<span class="c1">// See: https://en.wikipedia.org/wiki/Include_guard</span>
<span class="c1">// ----------------------------------------------</span>
<span class="cp">#ifndef GRADE_H</span>
<span class="cp">#define GRADE_H</span>

<span class="k">class</span><span class="w"> </span><span class="nc">GRADE</span><span class="w"> </span><span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="c1">// This is the constructor operation.</span>
<span class="w"> </span><span class="c1">// ----------------------------------</span>
<span class="w"> </span><span class="n">GRADE</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="p">);</span>

<span class="w"> </span><span class="c1">// This is a class variable.</span>
<span class="w"> </span><span class="c1">// -------------------------</span>
<span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">letter</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// This is a member operation.</span>
<span class="w"> </span><span class="c1">// ---------------------------</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="nf">grade_numeric</span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="p">);</span>

<span class="w"> </span><span class="c1">// This is a class variable.</span>
<span class="w"> </span><span class="c1">// -------------------------</span>
<span class="w"> </span><span class="kt">int</span><span class="w"> </span><span class="n">numeric</span><span class="p">;</span>
<span class="p">};</span>
<span class="cp">#endif</span>
</pre></div>
<p>A <a href="Constructor_(object-oriented_programming)" title="Constructor (object-oriented programming)">constructor</a> operation is a function with the same name as the class name.<sup id="cite_ref-stroustrup-ch2-49_27-0" class="reference"><a href="#cite_note-stroustrup-ch2-49-27"><span class="cite-bracket">[</span>26<span class="cite-bracket">]</span></a></sup> It is executed when the calling operation executes the <code>new</code> statement.
</p><p>A module's other file is the <i><a href="Source_code" title="Source code">source file</a></i>. Here is a C++ source file for the <i>GRADE class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// grade.cpp</span>
<span class="c1">// ---------</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"grade.h"</span>

<span class="n">GRADE</span><span class="o">::</span><span class="n">GRADE</span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="c1">// Reference the object using the keyword 'this'.</span>
<span class="w"> </span><span class="c1">// ----------------------------------------------</span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">letter</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">letter</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// This is Temporal Cohesion</span>
<span class="w"> </span><span class="c1">// -------------------------</span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">numeric</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">grade_numeric</span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="p">);</span>
<span class="p">}</span>

<span class="kt">int</span><span class="w"> </span><span class="n">GRADE</span><span class="o">::</span><span class="n">grade_numeric</span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'A'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'a'</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">4</span><span class="p">;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'B'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'b'</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">3</span><span class="p">;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'C'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'c'</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">2</span><span class="p">;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'D'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'d'</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="k">if</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'F'</span><span class="w"> </span><span class="o">||</span><span class="w"> </span><span class="n">letter</span><span class="w"> </span><span class="o">==</span><span class="w"> </span><span class="sc">'f'</span><span class="w"> </span><span class="p">)</span><span class="w"> </span><span class="p">)</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="w"> </span><span class="k">else</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">-1</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Here is a C++ <i>header file</i> for the <i>PERSON class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// person.h</span>
<span class="c1">// --------</span>
<span class="cp">#ifndef PERSON_H</span>
<span class="cp">#define PERSON_H</span>

<span class="k">class</span><span class="w"> </span><span class="nc">PERSON</span><span class="w"> </span><span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="n">PERSON</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="w"> </span><span class="p">);</span>
<span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="p">;</span>
<span class="p">};</span>
<span class="cp">#endif</span>
</pre></div>
<p>Here is a C++ <i>source file</i> for the <i>PERSON class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// person.cpp</span>
<span class="c1">// ----------</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"person.h"</span>

<span class="n">PERSON</span><span class="o">::</span><span class="n">PERSON</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="w"> </span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">name</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Here is a C++ <i>header file</i> for the <i>STUDENT class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// student.h</span>
<span class="c1">// ---------</span>
<span class="cp">#ifndef STUDENT_H</span>
<span class="cp">#define STUDENT_H</span>

<span class="cp">#include</span><span class="w"> </span><span class="cpf">"person.h"</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"grade.h"</span>

<span class="c1">// A STUDENT is a subset of PERSON.</span>
<span class="c1">// --------------------------------</span>
<span class="k">class</span><span class="w"> </span><span class="nc">STUDENT</span><span class="w"> </span><span class="o">:</span><span class="w"> </span><span class="k">public</span><span class="w"> </span><span class="n">PERSON</span><span class="p">{</span>
<span class="k">public</span><span class="o">:</span>
<span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="w"> </span><span class="p">);</span>
<span class="w"> </span><span class="o">~</span><span class="n">STUDENT</span><span class="p">();</span>
<span class="w"> </span><span class="n">GRADE</span><span class="w"> </span><span class="o">*</span><span class="n">grade</span><span class="p">;</span>
<span class="p">};</span>
<span class="cp">#endif</span>
</pre></div>
<p>Here is a C++ <i>source file</i> for the <i>STUDENT class</i> in a simple school application:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// student.cpp</span>
<span class="c1">// -----------</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"student.h"</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"person.h"</span>

<span class="n">STUDENT</span><span class="o">::</span><span class="n">STUDENT</span><span class="w"> </span><span class="p">(</span><span class="w"> </span><span class="k">const</span><span class="w"> </span><span class="kt">char</span><span class="w"> </span><span class="o">*</span><span class="n">name</span><span class="w"> </span><span class="p">)</span><span class="o">:</span>
<span class="w"> </span><span class="c1">// Execute the constructor of the PERSON superclass.</span>
<span class="w"> </span><span class="c1">// -------------------------------------------------</span>
<span class="w"> </span><span class="n">PERSON</span><span class="p">(</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="c1">// Nothing else to do.</span>
<span class="w"> </span><span class="c1">// -------------------</span>
<span class="p">}</span>

<span class="n">STUDENT</span><span class="o">::~</span><span class="n">STUDENT</span><span class="p">()</span><span class="w"> </span>
<span class="p">{</span>
<span class="w"> </span><span class="c1">// deallocate grade's memory</span>
<span class="w"> </span><span class="c1">// to avoid memory leaks.</span>
<span class="w"> </span><span class="c1">// -------------------------------------------------</span>
<span class="w"> </span><span class="k">delete</span><span class="w"> </span><span class="k">this</span><span class="o">-&gt;</span><span class="n">grade</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Here is a driver program for demonstration:
</p>
<div class="mw-highlight mw-highlight-lang-cpp mw-content-ltr" dir="ltr"><pre><span class="c1">// student_dvr.cpp</span>
<span class="c1">// ---------------</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">&lt;iostream&gt;</span>
<span class="cp">#include</span><span class="w"> </span><span class="cpf">"student.h"</span>

<span class="kt">int</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="p">)</span>
<span class="p">{</span>
<span class="w"> </span><span class="n">STUDENT</span><span class="w"> </span><span class="o">*</span><span class="n">student</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">STUDENT</span><span class="p">(</span><span class="w"> </span><span class="s">"The Student"</span><span class="w"> </span><span class="p">);</span>
<span class="w"> </span><span class="n">student</span><span class="o">-&gt;</span><span class="n">grade</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">GRADE</span><span class="p">(</span><span class="w"> </span><span class="sc">'a'</span><span class="w"> </span><span class="p">);</span>

<span class="w"> </span><span class="n">std</span><span class="o">::</span><span class="n">cout</span><span class="w"> </span>
<span class="w"> </span><span class="c1">// Notice student inherits PERSON's name</span>
<span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">student</span><span class="o">-&gt;</span><span class="n">name</span>
<span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">": Numeric grade = "</span>
<span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="n">student</span><span class="o">-&gt;</span><span class="n">grade</span><span class="o">-&gt;</span><span class="n">numeric</span>
<span class="w"> </span><span class="o">&lt;&lt;</span><span class="w"> </span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">;</span>

<span class="w"> </span><span class="c1">// deallocate student's memory</span>
<span class="w"> </span><span class="c1">// to avoid memory leaks.</span>
<span class="w"> </span><span class="c1">// -------------------------------------------------</span>
<span class="w"> </span><span class="k">delete</span><span class="w"> </span><span class="n">student</span><span class="p">;</span>

<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="mi">0</span><span class="p">;</span>
<span class="p">}</span>
</pre></div>
<p>Here is a <a href="Makefile" class="mw-redirect" title="Makefile">makefile</a> to compile everything:
</p>
<div class="mw-highlight mw-highlight-lang-make mw-content-ltr" dir="ltr"><pre><span class="c"># makefile</span>
<span class="c"># --------</span>
<span class="nf">all</span><span class="o">:</span><span class="w"> </span><span class="n">student_dvr</span>

<span class="nf">clean</span><span class="o">:</span>
<span class="w"> </span>rm<span class="w"> </span>student_dvr<span class="w"> </span>*.o

<span class="nf">student_dvr</span><span class="o">:</span><span class="w"> </span><span class="n">student_dvr</span>.<span class="n">cpp</span> <span class="n">grade</span>.<span class="n">o</span> <span class="n">student</span>.<span class="n">o</span> <span class="n">person</span>.<span class="n">o</span>
<span class="w"> </span>c++<span class="w"> </span>student_dvr.cpp<span class="w"> </span>grade.o<span class="w"> </span>student.o<span class="w"> </span>person.o<span class="w"> </span>-o<span class="w"> </span>student_dvr

<span class="nf">grade.o</span><span class="o">:</span><span class="w"> </span><span class="n">grade</span>.<span class="n">cpp</span> <span class="n">grade</span>.<span class="n">h</span>
<span class="w"> </span>c++<span class="w"> </span>-c<span class="w"> </span>grade.cpp

<span class="nf">student.o</span><span class="o">:</span><span class="w"> </span><span class="n">student</span>.<span class="n">cpp</span> <span class="n">student</span>.<span class="n">h</span>
<span class="w"> </span>c++<span class="w"> </span>-c<span class="w"> </span>student.cpp

<span class="nf">person.o</span><span class="o">:</span><span class="w"> </span><span class="n">person</span>.<span class="n">cpp</span> <span class="n">person</span>.<span class="n">h</span>
<span class="w"> </span>c++<span class="w"> </span>-c<span class="w"> </span>person.cpp
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Functional_programming" title="Functional programming">Functional programming</a></li>
<li><a href="Reactive_programming" title="Reactive programming">Reactive programming</a></li>
<li><a href="History_of_programming_languages" title="History of programming languages">History of programming languages</a></li>
<li><a href="List_of_programming_languages_by_category" class="mw-redirect" title="List of programming languages by category">List of imperative programming languages</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><a href="Reconfigurable_computing" title="Reconfigurable computing">Reconfigurable computing</a> is a notable exception.</span>
</li>
</ol></div></div>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<div class="reflist">
<div class="mw-references-wrap mw-references-columns"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFJain2022" class="citation web cs1">Jain, Anisha (2022-12-10). <a rel="nofollow" class="external text" href="https://medium.datadriveninvestor.com/javascript-promises-is-there-a-better-approach-dd6a0a329131">"Javascript Promises— Is There a Better Approach?"</a>. <i>Medium</i>. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20221220020247/https://medium.datadriveninvestor.com/javascript-promises-is-there-a-better-approach-dd6a0a329131">Archived</a> from the original on 2022-12-20<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-12-20</span></span>.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.ionos.com/digitalguide/websites/web-development/imperative-programming/">"Imperative programming: Overview of the oldest programming paradigm"</a>. <i>IONOS Digitalguide</i>. 21 May 2021. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20220503083342/https://www.ionos.com/digitalguide/websites/web-development/imperative-programming/">Archived</a> from the original on 2022-05-03<span class="reference-accessdate">. Retrieved <span class="nowrap">2022-05-03</span></span>.</cite></span>
</li>
<li id="cite_note-:0-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-:0_4-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFBruce_Eckel2006" class="citation book cs1">Bruce Eckel (2006). <a rel="nofollow" class="external text" href="https://books.google.com/books?id=bQVvAQAAQBAJ&amp;q=imperative&amp;pg=PA24"><i>Thinking in Java</i></a>. <a href="Pearson_Education" title="Pearson Education">Pearson Education</a>. p.&nbsp;24. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-13-187248-6</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-16-5"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-16_5-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-16_5-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;16. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-24-6"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch2-24_6-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;24. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-25-7"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-25_7-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-25_7-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;25. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-19-8"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-19_8-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-19_8-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-19_8-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-19_8-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;19. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-30-9"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-30_9-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-30_9-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-30_9-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-30_9-3"><sup><i><b>d</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-30_9-4"><sup><i><b>e</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;30. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-31-10"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch2-31_10-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;31. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-37-11"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-37_11-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-37_11-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-37_11-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;37. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-geeksforgeeks-12"><span class="mw-cite-backlink">^ <a href="#cite_ref-geeksforgeeks_12-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-geeksforgeeks_12-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-geeksforgeeks_12-2"><sup><i><b>c</b></i></sup></a> <a href="#cite_ref-geeksforgeeks_12-3"><sup><i><b>d</b></i></sup></a></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.geeksforgeeks.org/memory-layout-of-c-program/">"Memory Layout of C Programs"</a>. 12 September 2011. <a rel="nofollow" class="external text" href="https://web.archive.org/web/20211106175644/https://www.geeksforgeeks.org/memory-layout-of-c-program/">Archived</a> from the original on 6 November 2021<span class="reference-accessdate">. Retrieved <span class="nowrap">25 May</span> 2022</span>.</cite></span>
</li>
<li id="cite_note-cpl-ch1-p31-13"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl-ch1-p31_13-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl-ch1-p31_13-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFKernighanRitchie1988" class="citation book cs1">Kernighan, Brian W.; Ritchie, Dennis M. (1988). <i>The C Programming Language Second Edition</i>. Prentice Hall. p.&nbsp;31. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-110362-8</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch6-128-14"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch6-128_14-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;128. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-lpi-ch6-p121-15"><span class="mw-cite-backlink">^ <a href="#cite_ref-lpi-ch6-p121_15-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-lpi-ch6-p121_15-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-lpi-ch6-p121_15-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFKerrisk2010" class="citation book cs1">Kerrisk, Michael (2010). <i>The Linux Programming Interface</i>. No Starch Press. p.&nbsp;121. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-59327-220-3</bdi>.</cite></span>
</li>
<li id="cite_note-lpi-ch6-p122-16"><span class="mw-cite-backlink"><b><a href="#cite_ref-lpi-ch6-p122_16-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKerrisk2010" class="citation book cs1">Kerrisk, Michael (2010). <i>The Linux Programming Interface</i>. No Starch Press. p.&nbsp;122. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-1-59327-220-3</bdi>.</cite></span>
</li>
<li id="cite_note-cpl-ch1-p185-17"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl-ch1-p185_17-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKernighanRitchie1988" class="citation book cs1">Kernighan, Brian W.; Ritchie, Dennis M. (1988). <i>The C Programming Language Second Edition</i>. Prentice Hall. p.&nbsp;185. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-110362-8</bdi>.</cite></span>
</li>
<li id="cite_note-cpl-ch8-p187-18"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl-ch8-p187_18-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFKernighanRitchie1988" class="citation book cs1">Kernighan, Brian W.; Ritchie, Dennis M. (1988). <i>The C Programming Language Second Edition</i>. Prentice Hall. p.&nbsp;187. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-13-110362-8</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-38-19"><span class="mw-cite-backlink">^ <a href="#cite_ref-cpl_3rd-ch2-38_19-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-38_19-1"><sup><i><b>b</b></i></sup></a> <a href="#cite_ref-cpl_3rd-ch2-38_19-2"><sup><i><b>c</b></i></sup></a></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;38. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-stroustrup-ch3-65-20"><span class="mw-cite-backlink"><b><a href="#cite_ref-stroustrup-ch3-65_20-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStroustrup2013" class="citation book cs1">Stroustrup, Bjarne (2013). <i>The C++ Programming Language, Fourth Edition</i>. Addison-Wesley. p.&nbsp;65. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-56384-2</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch8-193-21"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch8-193_21-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;193. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-39-22"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch2-39_22-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;39. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch2-35-23"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch2-35_23-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;35. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-cpl_3rd-ch8-192-24"><span class="mw-cite-backlink"><b><a href="#cite_ref-cpl_3rd-ch8-192_24-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFWilson2001" class="citation book cs1">Wilson, Leslie B. (2001). <i>Comparative Programming Languages, Third Edition</i>. Addison-Wesley. p.&nbsp;192. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>0-201-71012-9</bdi>.</cite></span>
</li>
<li id="cite_note-stroustrup-notes-22-25"><span class="mw-cite-backlink"><b><a href="#cite_ref-stroustrup-notes-22_25-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStroustrup2013" class="citation book cs1">Stroustrup, Bjarne (2013). <i>The C++ Programming Language, Fourth Edition</i>. Addison-Wesley. p.&nbsp;22. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-56384-2</bdi>.</cite></span>
</li>
<li id="cite_note-stroustrup-notes-21-26"><span class="mw-cite-backlink"><b><a href="#cite_ref-stroustrup-notes-21_26-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStroustrup2013" class="citation book cs1">Stroustrup, Bjarne (2013). <i>The C++ Programming Language, Fourth Edition</i>. Addison-Wesley. p.&nbsp;21. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-56384-2</bdi>.</cite></span>
</li>
<li id="cite_note-stroustrup-ch2-49-27"><span class="mw-cite-backlink"><b><a href="#cite_ref-stroustrup-ch2-49_27-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFStroustrup2013" class="citation book cs1">Stroustrup, Bjarne (2013). <i>The C++ Programming Language, Fourth Edition</i>. Addison-Wesley. p.&nbsp;49. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-56384-2</bdi>.</cite></span>
</li>
</ol></div></div>
<ul><li>Pratt, Terrence W. and <a href="Marvin_Victor_Zelkowitz" class="mw-redirect" title="Marvin Victor Zelkowitz">Marvin V. Zelkowitz</a>. <i>Programming Languages: Design and Implementation</i>, 3rd ed. Englewood Cliffs, N.J.: Prentice Hall, 1996.</li>
<li>Sebesta, Robert W. <i>Concepts of Programming Languages</i>, 3rd ed. Reading, Mass.: Addison-Wesley Publishing Company, 1996.</li></ul>
<dl><dd><i>Originally based on the article 'Imperative programming' by Stan Seibert, from <a href="Nupedia" title="Nupedia">Nupedia</a>, licensed under the <a href="GNU_Free_Documentation_License" title="GNU Free Documentation License">GNU Free Documentation License</a>.</i></dd></dl>
<div class="navbox-styles"><style data-mw-deduplicate="TemplateStyles:r1129693374">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hlist dl,.mw-parser-output .hlist ol,.mw-parser-output .hlist ul{margin:0;padding:0}.mw-parser-output .hlist dd,.mw-parser-output .hlist dt,.mw-parser-output .hlist li{margin:0;display:inline}.mw-parser-output .hlist.inline,.mw-parser-output .hlist.inline dl,.mw-parser-output .hlist.inline ol,.mw-parser-output .hlist.inline ul,.mw-parser-output .hlist dl dl,.mw-parser-output .hlist dl ol,.mw-parser-output .hlist dl ul,.mw-parser-output .hlist ol dl,.mw-parser-output .hlist ol ol,.mw-parser-output .hlist ol ul,.mw-parser-output .hlist ul dl,.mw-parser-output .hlist ul ol,.mw-parser-output .hlist ul ul{display:inline}.mw-parser-output .hlist .mw-empty-li{display:none}.mw-parser-output .hlist dt::after{content:": "}.mw-parser-output .hlist dd::after,.mw-parser-output .hlist li::after{content:" · ";font-weight:bold}.mw-parser-output .hlist dd:last-child::after,.mw-parser-output .hlist dt:last-child::after,.mw-parser-output .hlist li:last-child::after{content:none}.mw-parser-output .hlist dd dd:first-child::before,.mw-parser-output .hlist dd dt:first-child::before,.mw-parser-output .hlist dd li:first-child::before,.mw-parser-output .hlist dt dd:first-child::before,.mw-parser-output .hlist dt dt:first-child::before,.mw-parser-output .hlist dt li:first-child::before,.mw-parser-output .hlist li dd:first-child::before,.mw-parser-output .hlist li dt:first-child::before,.mw-parser-output .hlist li li:first-child::before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child::after,.mw-parser-output .hlist dd dt:last-child::after,.mw-parser-output .hlist dd li:last-child::after,.mw-parser-output .hlist dt dd:last-child::after,.mw-parser-output .hlist dt dt:last-child::after,.mw-parser-output .hlist dt li:last-child::after,.mw-parser-output .hlist li dd:last-child::after,.mw-parser-output .hlist li dt:last-child::after,.mw-parser-output .hlist li li:last-child::after{content:")";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li::before{content:" "counter(listitem)"\a0 "}.mw-parser-output .hlist dd ol>li:first-child::before,.mw-parser-output .hlist dt ol>li:first-child::before,.mw-parser-output .hlist li ol>li:first-child::before{content:" ("counter(listitem)"\a0 "}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1236075235">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbox{box-sizing:border-box;border:1px solid #a2a9b1;width:100%;clear:both;font-size:88%;text-align:center;padding:1px;margin:1em auto 0}.mw-parser-output .navbox .navbox{margin-top:0}.mw-parser-output .navbox+.navbox,.mw-parser-output .navbox+.navbox-styles+.navbox{margin-top:-1px}.mw-parser-output .navbox-inner,.mw-parser-output .navbox-subgroup{width:100%}.mw-parser-output .navbox-group,.mw-parser-output .navbox-title,.mw-parser-output .navbox-abovebelow{padding:0.25em 1em;line-height:1.5em;text-align:center}.mw-parser-output .navbox-group{white-space:nowrap;text-align:right}.mw-parser-output .navbox,.mw-parser-output .navbox-subgroup{background-color:#fdfdfd}.mw-parser-output .navbox-list{line-height:1.5em;border-color:#fdfdfd}.mw-parser-output .navbox-list-with-group{text-align:left;border-left-width:2px;border-left-style:solid}.mw-parser-output tr+tr>.navbox-abovebelow,.mw-parser-output tr+tr>.navbox-group,.mw-parser-output tr+tr>.navbox-image,.mw-parser-output tr+tr>.navbox-list{border-top:2px solid #fdfdfd}.mw-parser-output .navbox-title{background-color:#ccf}.mw-parser-output .navbox-abovebelow,.mw-parser-output .navbox-group,.mw-parser-output .navbox-subgroup .navbox-title{background-color:#ddf}.mw-parser-output .navbox-subgroup .navbox-group,.mw-parser-output .navbox-subgroup .navbox-abovebelow{background-color:#e6e6ff}.mw-parser-output .navbox-even{background-color:#f7f7f7}.mw-parser-output .navbox-odd{background-color:transparent}.mw-parser-output .navbox .hlist td dl,.mw-parser-output .navbox .hlist td ol,.mw-parser-output .navbox .hlist td ul,.mw-parser-output .navbox td.hlist dl,.mw-parser-output .navbox td.hlist ol,.mw-parser-output .navbox td.hlist ul{padding:0.125em 0}.mw-parser-output .navbox .navbar{display:block;font-size:100%}.mw-parser-output .navbox-title .navbar{float:left;text-align:left;margin-right:0.5em}body.skin--responsive .mw-parser-output .navbox-image img{max-width:none!important}@media print{body.ns-0 .mw-parser-output .navbox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style></div><div role="navigation" class="navbox" aria-labelledby="Programming_paradigms_(Comparison_by_language)368" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><style data-mw-deduplicate="TemplateStyles:r1239400231">
/* start https://en.wikipedia.org/ */


.mw-parser-output .navbar{display:inline;font-size:88%;font-weight:normal}.mw-parser-output .navbar-collapse{float:left;text-align:left}.mw-parser-output .navbar-boxtext{word-spacing:0}.mw-parser-output .navbar ul{display:inline-block;white-space:nowrap;line-height:inherit}.mw-parser-output .navbar-brackets::before{margin-right:-0.125em;content:"[ "}.mw-parser-output .navbar-brackets::after{margin-left:-0.125em;content:" ]"}.mw-parser-output .navbar li{word-spacing:-0.125em}.mw-parser-output .navbar a>span,.mw-parser-output .navbar a>abbr{text-decoration:inherit}.mw-parser-output .navbar-mini abbr{font-variant:small-caps;border-bottom:none;text-decoration:none;cursor:inherit}.mw-parser-output .navbar-ct-full{font-size:114%;margin:0 7em}.mw-parser-output .navbar-ct-mini{font-size:114%;margin:0 4em}html.skin-theme-clientpref-night .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}@media(prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .navbar li a abbr{color:var(--color-base)!important}}@media print{.mw-parser-output .navbar{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div id="Programming_paradigms_(Comparison_by_language)368" style="font-size:114%;margin:0 4em"><a href="Programming_paradigm" title="Programming paradigm">Programming paradigms</a> (<a href="Comparison_of_multi-paradigm_programming_languages" title="Comparison of multi-paradigm programming languages">Comparison by language</a>)</div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%"></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Structured_programming" title="Structured programming">Structured</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Jackson_structured_programming" title="Jackson structured programming">Jackson structures</a></li>
<li><a href="Block_(programming)" title="Block (programming)">Block-structured</a></li>
<li><a href="Modular_programming" title="Modular programming">Modular</a></li>
<li><a href="Non-structured_programming" title="Non-structured programming">Non-structured</a></li>
<li><a href="Procedural_programming" title="Procedural programming">Procedural</a></li>
<li><a href="Programming_in_the_large_and_programming_in_the_small" title="Programming in the large and programming in the small">Programming in the large and in the small</a></li>
<li><a href="Design_by_contract" title="Design by contract">Design by contract</a></li>
<li><a href="Invariant-based_programming" title="Invariant-based programming">Invariant-based</a></li>
<li><a href="Nested_function" title="Nested function">Nested function</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Object-oriented_programming" title="Object-oriented programming">Object-oriented</a><br>(<a href="Comparison_of_programming_languages_(object-oriented_programming)" title="Comparison of programming languages (object-oriented programming)">comparison</a>, <a href="List_of_object-oriented_programming_languages" title="List of object-oriented programming languages">list</a>)</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Class-based_programming" title="Class-based programming">Class-based</a>, <a href="Prototype-based_programming" title="Prototype-based programming">Prototype-based</a>, <a href="Object-based_language" title="Object-based language">Object-based</a></li>
<li><a href="Agent-oriented_programming" title="Agent-oriented programming">Agent</a></li>
<li><a href="Immutable_object" title="Immutable object">Immutable object</a></li>
<li><a href="Persistent_programming_language" title="Persistent programming language">Persistent</a></li>
<li><a href="Uniform_function_call_syntax" title="Uniform function call syntax">Uniform function call syntax</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Declarative_programming" title="Declarative programming">Declarative</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em"></div><table class="nowraplinks navbox-subgroup" style="border-spacing:0"><tbody><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Functional_programming" title="Functional programming">Functional</a><br>(<a href="Comparison_of_functional_programming_languages" title="Comparison of functional programming languages">comparison</a>)</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Recursion_(computer_science)" title="Recursion (computer science)">Recursive</a></li>
<li><a href="Anonymous_function" title="Anonymous function">Anonymous function</a> (<a href="Partial_application" title="Partial application">Partial application</a>)</li>
<li><a href="Higher-order_programming" title="Higher-order programming">Higher-order</a></li>
<li><a href="Purely_functional_programming" title="Purely functional programming">Purely functional</a></li>
<li><a href="Total_functional_programming" title="Total functional programming">Total</a></li>
<li><a href="Strict_programming_language" title="Strict programming language">Strict</a></li>
<li><a href="Generalized_algebraic_data_type" title="Generalized algebraic data type">GADTs</a></li>
<li><a href="Dependent_type" title="Dependent type">Dependent types</a></li>
<li><a href="Functional_logic_programming" title="Functional logic programming">Functional logic</a></li>
<li><a href="Tacit_programming" title="Tacit programming">Point-free style</a></li>
<li><a href="Expression-oriented_programming_language" title="Expression-oriented programming language">Expression-oriented</a></li>
<li><a href="Applicative_programming_language" title="Applicative programming language">Applicative</a>, <a href="Concatenative_programming_language" title="Concatenative programming language">Concatenative</a></li>
<li><a href="Function-level_programming" title="Function-level programming">Function-level</a>, <a href="Value-level_programming" title="Value-level programming">Value-level</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Dataflow_programming" title="Dataflow programming">Dataflow</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Flow-based_programming" title="Flow-based programming">Flow-based</a></li>
<li><a href="Reactive_programming" title="Reactive programming">Reactive</a> (<a href="Functional_reactive_programming" title="Functional reactive programming">Functional reactive</a>)</li>
<li><a href="Signal_programming" class="mw-redirect" title="Signal programming">Signals</a></li>
<li><a href="Stream_processing" title="Stream processing">Streams</a></li>
<li><a href="Synchronous_programming_language" title="Synchronous programming language">Synchronous</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Logic_programming" title="Logic programming">Logic</a></th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Abductive_logic_programming" title="Abductive logic programming">Abductive logic</a></li>
<li><a href="Answer_set_programming" title="Answer set programming">Answer set</a></li>
<li><a href="Constraint_programming" title="Constraint programming">Constraint</a> (<a href="Constraint_logic_programming" title="Constraint logic programming">Constraint logic</a>)</li>
<li><a href="Inductive_logic_programming" title="Inductive logic programming">Inductive logic</a></li>
<li><a href="Nondeterministic_programming" title="Nondeterministic programming">Nondeterministic</a></li>
<li><a href="Ontology_language" title="Ontology language">Ontology</a></li>
<li><a href="Probabilistic_logic_programming" title="Probabilistic logic programming">Probabilistic logic</a></li>
<li><a href="Query_language" title="Query language">Query</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Domain-specific_language" title="Domain-specific language">DSL</a></th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Algebraic_modeling_language" title="Algebraic modeling language">Algebraic modeling</a></li>
<li><a href="Array_programming" title="Array programming">Array</a></li>
<li><a href="Automata-based_programming" title="Automata-based programming">Automata-based</a> (<a href="Action_language" title="Action language">Action</a>)</li>
<li><a href="Command_language" title="Command language">Command</a> (<a href="Spacecraft_command_language" title="Spacecraft command language">Spacecraft</a>)</li>
<li><a href="Differentiable_programming" title="Differentiable programming">Differentiable</a></li>
<li><a href="End-user_development" title="End-user development">End-user</a></li>
<li><a href="Grammar-oriented_programming" title="Grammar-oriented programming">Grammar-oriented</a></li>
<li><a href="Interface_description_language" title="Interface description language">Interface description</a></li>
<li><a href="Language-oriented_programming" title="Language-oriented programming">Language-oriented</a></li>
<li><a href="List_comprehension" title="List comprehension">List comprehension</a></li>
<li><a href="Low-code_development_platform" title="Low-code development platform">Low-code</a></li>
<li><a href="Modeling_language" title="Modeling language">Modeling</a></li>
<li><a href="Natural-language_programming" class="mw-redirect" title="Natural-language programming">Natural language</a></li>
<li><a href="Non-English-based_programming_languages" title="Non-English-based programming languages">Non-English-based</a></li>
<li><a href="Page_description_language" title="Page description language">Page description</a></li>
<li><a href="Pipeline_(software)" title="Pipeline (software)">Pipes</a> and <a href="Filter_(software)" title="Filter (software)">filters</a></li>
<li><a href="Probabilistic_programming" title="Probabilistic programming">Probabilistic</a></li>
<li><a href="Quantum_programming" title="Quantum programming">Quantum</a></li>
<li><a href="Scientific_programming_language" title="Scientific programming language">Scientific</a></li>
<li><a href="Scripting_language" title="Scripting language">Scripting</a></li>
<li><a href="Set_theoretic_programming" title="Set theoretic programming">Set-theoretic</a></li>
<li><a href="Simulation_language" title="Simulation language">Simulation</a></li>
<li><a href="Stack-oriented_programming" title="Stack-oriented programming">Stack-based</a></li>
<li><a href="System_programming_language" title="System programming language">System</a></li>
<li><a href="Tactile_programming_language" title="Tactile programming language">Tactile</a></li>
<li><a href="Template_processor" title="Template processor">Templating</a></li>
<li><a href="Transformation_language" title="Transformation language">Transformation</a> (<a href="Graph_rewriting" title="Graph rewriting">Graph rewriting</a>, <a href="Production_system_(computer_science)" title="Production system (computer science)">Production</a>, <a href="Pattern_matching" title="Pattern matching">Pattern</a>)</li>
<li><a href="Visual_programming_language" title="Visual programming language">Visual</a></li></ul>
</div></td></tr></tbody></table><div></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Concurrent_computing" title="Concurrent computing">Concurrent</a>,<br><a href="Distributed_computing" title="Distributed computing">distributed</a>,<br><a href="Parallel_computing" title="Parallel computing">parallel</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Actor_model" title="Actor model">Actor-based</a></li>
<li><a href="Automatic_mutual_exclusion" title="Automatic mutual exclusion">Automatic mutual exclusion</a></li>
<li><a href="Choreographic_programming" title="Choreographic programming">Choreographic programming</a></li>
<li><a href="Concurrent_logic_programming" title="Concurrent logic programming">Concurrent logic</a> (<a href="Concurrent_constraint_logic_programming" title="Concurrent constraint logic programming">Concurrent constraint logic</a>)</li>
<li><a href="Concurrent_object-oriented_programming" title="Concurrent object-oriented programming">Concurrent OO</a></li>
<li><a href="Macroprogramming" title="Macroprogramming">Macroprogramming</a></li>
<li><a href="Multitier_programming" title="Multitier programming">Multitier programming</a></li>
<li><a href="Organic_computing" title="Organic computing">Organic computing</a></li>
<li><a href="Parallel_programming_model" title="Parallel programming model">Parallel programming models</a></li>
<li><a href="Partitioned_global_address_space" title="Partitioned global address space">Partitioned global address space</a></li>
<li><a href="Process-oriented_programming" title="Process-oriented programming">Process-oriented</a></li>
<li><a href="Relativistic_programming" title="Relativistic programming">Relativistic programming</a></li>
<li><a href="Service-oriented_programming" title="Service-oriented programming">Service-oriented</a></li>
<li><a href="Structured_concurrency" title="Structured concurrency">Structured concurrency</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Metaprogramming" title="Metaprogramming">Metaprogramming</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Attribute-oriented_programming" title="Attribute-oriented programming">Attribute-oriented</a></li>
<li><a href="Automatic_programming" title="Automatic programming">Automatic</a> (<a href="Inductive_programming" title="Inductive programming">Inductive</a>)</li>
<li><a href="Dynamic_programming_language" title="Dynamic programming language">Dynamic</a></li>
<li><a href="Extensible_programming" title="Extensible programming">Extensible</a></li>
<li><a href="Generic_programming" title="Generic programming">Generic</a></li>
<li><a href="Homoiconicity" title="Homoiconicity">Homoiconicity</a></li>
<li><a href="Interactive_programming" title="Interactive programming">Interactive</a></li>
<li><a href="Macro_(computer_science)" title="Macro (computer science)">Macro</a> (<a href="Hygienic_macro" title="Hygienic macro">Hygienic</a>)</li>
<li><a href="Metalinguistic_abstraction" title="Metalinguistic abstraction">Metalinguistic abstraction</a></li>
<li><a href="Multi-stage_programming" title="Multi-stage programming">Multi-stage</a></li>
<li><a href="Program_synthesis" title="Program synthesis">Program synthesis</a> (<a href="Bayesian_program_synthesis" title="Bayesian program synthesis">Bayesian</a>, <a href="Inferential_programming" title="Inferential programming">Inferential</a>, <a href="Programming_by_demonstration" title="Programming by demonstration">by demonstration</a>, <a href="Programming_by_example" title="Programming by example">by example</a>)</li>
<li><a href="Reflective_programming" title="Reflective programming">Reflective</a></li>
<li><a href="Self-modifying_code" title="Self-modifying code">Self-modifying code</a></li>
<li><a href="Symbolic_programming" title="Symbolic programming">Symbolic</a></li>
<li><a href="Template_metaprogramming" title="Template metaprogramming">Template</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Separation_of_concerns" title="Separation of concerns">Separation<br>of concerns</a></th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Aspect-oriented_programming" title="Aspect-oriented programming">Aspects</a></li>
<li><a href="Component-based_software_engineering" title="Component-based software engineering">Components</a></li>
<li><a href="Data-driven_programming" title="Data-driven programming">Data-driven</a></li>
<li><a href="Data-oriented_design" title="Data-oriented design">Data-oriented</a></li>
<li><a href="Event-driven_programming" title="Event-driven programming">Event-driven</a></li>
<li><a href="Feature-oriented_programming" title="Feature-oriented programming">Features</a></li>
<li><a href="Literate_programming" title="Literate programming">Literate</a></li>
<li><a href="Role-oriented_programming" title="Role-oriented programming">Roles</a></li>
<li><a href="Subject-oriented_programming" title="Subject-oriented programming">Subjects</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox" aria-labelledby="Types_of_programming_languages107" style="padding:3px"><table class="nowraplinks mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Types_of_programming_languages107" style="font-size:114%;margin:0 4em"><a href="Programming_paradigm" title="Programming paradigm">Types of programming languages</a></div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">Level</th><td class="navbox-list-with-group navbox-list navbox-odd hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="Machine_code" title="Machine code">Machine</a></li>
<li><a href="Assembly_language" title="Assembly language">Assembly</a></li>
<li><a href="Compiled_language" title="Compiled language">Compiled</a></li>
<li><a href="Interpreted_language" class="mw-redirect" title="Interpreted language">Interpreted</a></li></ul>
<ul><li><a href="Low-level_programming_language" title="Low-level programming language">Low-level</a></li>
<li><a href="High-level_programming_language" title="High-level programming language">High-level</a></li>
<li><a href="Very_high-level_programming_language" title="Very high-level programming language">Very high-level</a></li>
<li><a href="Esoteric_programming_language" title="Esoteric programming language">Esoteric</a></li></ul>
</div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%"><a href="Programming_language_generations" title="Programming language generations">Generation</a></th><td class="navbox-list-with-group navbox-list navbox-even hlist" style="width:100%;padding:0"><div style="padding:0 0.25em">
<ul><li><a href="First-generation_programming_language" title="First-generation programming language">First</a></li>
<li><a href="Second-generation_programming_language" title="Second-generation programming language">Second</a></li>
<li><a href="Third-generation_programming_language" title="Third-generation programming language">Third</a></li>
<li><a href="Fourth-generation_programming_language" title="Fourth-generation programming language">Fourth</a></li>
<li><a href="Fifth-generation_programming_language" title="Fifth-generation programming language">Fifth</a></li></ul>
</div></td></tr></tbody></table></div>
<div class="navbox-styles"></div><div role="navigation" class="navbox authority-control" aria-labelledby="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q275596#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata646" style="padding:3px"><table class="nowraplinks hlist mw-collapsible autocollapse navbox-inner" style="border-spacing:0;background:transparent;color:inherit"><tbody><tr><th scope="col" class="navbox-title" colspan="2"><div id="Authority_control_databases_frameless&amp;#124;text-top&amp;#124;10px&amp;#124;alt=Edit_this_at_Wikidata&amp;#124;link=https&amp;#58;//www.wikidata.org/wiki/Q275596#identifiers&amp;#124;class=noprint&amp;#124;Edit_this_at_Wikidata646" style="font-size:114%;margin:0 4em">Authority control databases </div></th></tr><tr><th scope="row" class="navbox-group" style="width:1%">National</th><td class="navbox-list-with-group navbox-list navbox-odd" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://id.loc.gov/authorities/sh2009011030">United States</a></span></li><li><span class="uid"><a rel="nofollow" class="external text" href="https://www.nli.org.il/en/authorities/987007572661305171">Israel</a></span></li></ul></div></td></tr><tr><th scope="row" class="navbox-group" style="width:1%">Other</th><td class="navbox-list-with-group navbox-list navbox-even" style="width:100%;padding:0"><div style="padding:0 0.25em"><ul><li><span class="uid"><a rel="nofollow" class="external text" href="https://lux.collections.yale.edu/view/concept/ef1e2447-a3e6-4920-98cd-0e2b9a1d75e2">Yale LUX</a></span></li></ul></div></td></tr></tbody></table></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-06-17" href="https://en.wikipedia.org/wiki/?title=Imperative_programming&amp;oldid=1296044839">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>